package com.chen.mplugin;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Task;

public class MyPlygin  implements Plugin<Project> {
    @Override
    public void apply(Project target) {
        System.out.println("ApplyMyPlugin22");

        target.getExtensions().create("versionCof",VersionConfig.class);
        Task localTask = target.task("printVersion").doLast(task -> {
            System.out.println("currentVersion: " + target.getExtensions().getByType(VersionConfig.class).getCurrentVersion());
        });
        localTask.setGroup("ChenTest");
    }
}
